// uuid.c

#include "UUID.h"

UUID::UUID()
{
}

UUID::~UUID()
{
}

std::string UUID::generate_uuid()
{
  std::random_device rd;
  std::mt19937 gen(rd());
  std::uniform_int_distribution<> distrib(0, 255);

  std::stringstream ss;
  for (int i = 0; i < 16; ++i)
  {
    ss << std::hex << std::setfill('0') << std::setw(2) << distrib(gen);
    if (i == 3 || i == 5 || i == 7 || i == 9)
    {
      ss << "-";
    }
  }
  return ss.str();
}
